<?php 

namespace app\admin\model;

use think\Db;
use think\Model;

class Danwei extends Model
{
    protected $table = "yzn_gd_danwei";

    public static function getDanwei($danwei_id)
    {
        $danwei = self::where('deleted',0)->find($danwei_id);
        if(!empty($danwei)){
            return $danwei['title'];
        }
        return '';
    }
}